<html>
<head><meta charset="utf-8"><title>Make rustc_query_system dyn · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html">Make rustc_query_system dyn</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213026663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213026663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213026663">(Oct 12 2020 at 11:33)</a>:</h4>
<p>As measured in <a href="https://github.com/rust-lang/rust/pull/76680">#76680</a>, most of the query system is monomorphized 500 times.</p>
<p>I'm trying to make things <code>dyn</code> instead of generic to (hopefully) massively improve bootstrap time, but it's hard.<br>
<code>rustc_query_system::query::plumbing::get_query_impl()</code> would benefit the most,  but it's generic over both  <code>QueryContext</code> and <code>QueryCache</code> which have multiple associated types that cyclically depend on each other.</p>
<p>Does someone have ideas on how to approach this?</p>



<a name="213026718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213026718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213026718">(Oct 12 2020 at 11:34)</a>:</h4>
<p>After a whole day of compile-error driven development, my impression is that the <code>QueryContext</code> trait has to go.<br>
I've had two ideas:</p>
<ul>
<li>Only TyCtxt implements QueryContext, so by merging rustc_query_system into rustc_middle, a lot of things could take TyCtxt directly and wouldn't be generic anymore. But rustc_middle is so big already...</li>
<li>Make <code>QueryContext</code> a struct with function pointers. Same effect, can keep the crates separate, but it's an even bigger refactoring.</li>
</ul>



<a name="213027071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213027071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213027071">(Oct 12 2020 at 11:39)</a>:</h4>
<p>For context: I'm a relatively new contributer (Hi everyone <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> ) and I have three weeks of free time before university starts again, wich I'd like to spend working on rustc. Specifically improving compile times.</p>



<a name="213036059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213036059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213036059">(Oct 12 2020 at 13:14)</a>:</h4>
<p>Instead of trying to do the whole thing in one go, are there any individual parts that we could "dynify" on their own without affecting the entire system?</p>



<a name="213041039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213041039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213041039">(Oct 12 2020 at 13:54)</a>:</h4>
<p>Not much I could find. The <code>&lt;CTX: QueryContext&gt;</code>is almost everywhere, and that one isn't dyn-safe. And it's hard to make it dyn-safe.<br>
I'll make a PR next with the small things I could find.</p>



<a name="213047756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213047756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213047756">(Oct 12 2020 at 14:47)</a>:</h4>
<p>instead of making <code>QueryContext</code> object safe, can we make a single component object safe? It looks to me like <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_query_system/dep_graph/trait.DepKind.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_query_system/dep_graph/trait.DepKind.html</a> would just require some closures to get boxed in order to become object safe. Once that is object safe, <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_query_system/dep_graph/trait.DepContext.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_query_system/dep_graph/trait.DepContext.html</a> could be made object safe next... and so on</p>



<a name="213047793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213047793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213047793">(Oct 12 2020 at 14:47)</a>:</h4>
<p>each step can be perf-checked as an individual PR</p>



<a name="213047961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213047961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213047961">(Oct 12 2020 at 14:48)</a>:</h4>
<p>That sounds easier, thanks!</p>



<a name="213051081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213051081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213051081">(Oct 12 2020 at 15:13)</a>:</h4>
<p>Another thing that might be worth trying -- not sure if you've looked at it yet -- is trying to split the DepNode enum into a bunch of structs implementing a DepNode trait, and pass them around as either Box&lt;DepNode&gt; or &amp;dyn DepNode (note: no allocations needed for unit structs, and we could potentially smallbox optimize to avoid heap allocations if they end up looking very expensive).</p>
<p>I think we currently have a lot of functions that are codegen'd as <code>match depnode { ... }</code> and then an exhaustive match that ends up with a lot of code being generated. LLVM has some pretty poor performance on large functions, historically at least, and the match itself seems unlikely to be as good performance wise as a single indirect branch (from a instruction cache etc level)</p>



<a name="213051570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213051570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213051570">(Oct 12 2020 at 15:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn/near/213051081">said</a>:</p>
<blockquote>
<p>I think we currently have a lot of functions that are codegen'd as <code>match depnode { ... }</code> and then an exhaustive match that ends up with a lot of code being generated. LLVM has some pretty poor performance on large functions, historically at least, and the match itself seems unlikely to be as good performance wise as a single indirect branch (from a instruction cache etc level)</p>
</blockquote>
<p>maybe a simpler change would be to split the match arms into different functions? not sure whether that's easier or harder though</p>



<a name="213051812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213051812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213051812">(Oct 12 2020 at 15:19)</a>:</h4>
<p>each match arm is pretty small, so not sure how helpful that would be. but it's not trivial usually either...</p>



<a name="213052172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052172">(Oct 12 2020 at 15:21)</a>:</h4>
<p>I'm looking at the code. There is the DepKind enum in <code>define_dep_nodes</code> but there is also a DepKind trait in rustc_query_system::dep_graph. Are the two related?</p>



<a name="213052277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052277">(Oct 12 2020 at 15:22)</a>:</h4>
<p>I think sort of</p>



<a name="213052309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052309">(Oct 12 2020 at 15:23)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="119009">@eddyb</span></p>



<a name="213052352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052352">(Oct 12 2020 at 15:23)</a>:</h4>
<p>so specifically what I was thinking of is that we have e.g. <a href="https://github.com/Mark-Simulacrum/rust/blob/d8c035abbf534d5e4101c2d4fb804a9e26dd6ccd/compiler/rustc_middle/src/ty/query/mod.rs#L172-L186">https://github.com/Mark-Simulacrum/rust/blob/d8c035abbf534d5e4101c2d4fb804a9e26dd6ccd/compiler/rustc_middle/src/ty/query/mod.rs#L172-L186</a> which is defined <a href="https://github.com/rust-lang/rust/blob/e37c99fa1ca2341d652a1b1859ea9aa2ae993e1e/compiler/rustc_macros/src/query.rs#L549">https://github.com/rust-lang/rust/blob/e37c99fa1ca2341d652a1b1859ea9aa2ae993e1e/compiler/rustc_macros/src/query.rs#L549</a></p>



<a name="213052381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052381">(Oct 12 2020 at 15:23)</a>:</h4>
<p>the dep node there is the enum, not the trait</p>



<a name="213052527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052527">(Oct 12 2020 at 15:25)</a>:</h4>
<p>but the expansion is basically a (series of) trait method calls anyway:</p>
<p><a href="https://github.com/rust-lang/rust/blob/e37c99fa1ca2341d652a1b1859ea9aa2ae993e1e/compiler/rustc_macros/src/query.rs#L500-L511">https://github.com/rust-lang/rust/blob/e37c99fa1ca2341d652a1b1859ea9aa2ae993e1e/compiler/rustc_macros/src/query.rs#L500-L511</a></p>



<a name="213052667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052667">(Oct 12 2020 at 15:26)</a>:</h4>
<p>It's strange. There is <code>impl DepKind</code> in the macro that defines the same methods as the trait, but doesn't actually implement the trait.</p>



<a name="213052685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052685">(Oct 12 2020 at 15:26)</a>:</h4>
<p>Maybe it was forgotten at some point?</p>



<a name="213052716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213052716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213052716">(Oct 12 2020 at 15:26)</a>:</h4>
<p>try removing it and see if things still compile?</p>



<a name="213053044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053044">(Oct 12 2020 at 15:29)</a>:</h4>
<p>The trait is used within rustc_query_system. Let's see how much i need to remove.</p>



<a name="213053085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053085">(Oct 12 2020 at 15:29)</a>:</h4>
<p>I would rather see us go the other way, fwiw</p>



<a name="213053157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053157">(Oct 12 2020 at 15:30)</a>:</h4>
<p>i.e., it seems like a trait is the better way to do this rather than a bunch of methods expanding to <code>match foo { ... }</code></p>



<a name="213053195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053195">(Oct 12 2020 at 15:30)</a>:</h4>
<p>though <em>this</em> trait may not allow that anyway, I'm not sure</p>



<a name="213053208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053208">(Oct 12 2020 at 15:30)</a>:</h4>
<p>Yes, but it doesn't hurt to see if it's currently used.</p>



<a name="213053280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053280">(Oct 12 2020 at 15:31)</a>:</h4>
<p>(Sidenote: how do you quote in Zulip?)</p>



<a name="213053313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053313">(Oct 12 2020 at 15:31)</a>:</h4>
<p>You can hit "i" or click the triple dot (need to mouse over) by the time on the right hand side</p>



<a name="213053376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053376">(Oct 12 2020 at 15:32)</a>:</h4>
<p>oh 'i' is nice, I didn't know that one</p>



<a name="213053392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053392">(Oct 12 2020 at 15:32)</a>:</h4>
<p>or press <code>&gt;</code></p>



<a name="213053446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053446">(Oct 12 2020 at 15:33)</a>:</h4>
<p>Any way on Android? Seems like it should be in the long-press menu, but no...</p>



<a name="213053470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213053470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213053470">(Oct 12 2020 at 15:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="211727">Jonas Schievink</span> <a href="#narrow/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn/near/213053392">said</a>:</p>
<blockquote>
<p>or press <code>&gt;</code></p>
</blockquote>
<p><span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="213080364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213080364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213080364">(Oct 12 2020 at 20:01)</a>:</h4>
<p>There are actually very few exhaustive matches on <code>dep_node</code>, so you may be able to turn them around easily.</p>



<a name="213080504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213080504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213080504">(Oct 12 2020 at 20:02)</a>:</h4>
<p><span class="user-mention" data-user-id="200368">@Julian-Wollersberger</span>,  it looks like the <code>DepKind</code> trait is implemented for the enum in <code>compiler/rustc_middle/src/dep_graph/mod.rs</code>: <code>impl rustc_query_system::dep_graph::DepKind for DepKind</code></p>



<a name="213080842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213080842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213080842">(Oct 12 2020 at 20:06)</a>:</h4>
<p>Oh. Spooky action at a distance, I see.</p>



<a name="213085831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213085831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213085831">(Oct 12 2020 at 20:58)</a>:</h4>
<p>I've made <a href="https://github.com/rust-lang/rust/pull/77871">Make fewer types generic over QueryContext #77871</a> now.<br>
I'll continue tomorrow.</p>



<a name="213086872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213086872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213086872">(Oct 12 2020 at 21:10)</a>:</h4>
<p>anyone mind if I make an <code>A-query-system</code> label?</p>



<a name="213087434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213087434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213087434">(Oct 12 2020 at 21:17)</a>:</h4>
<p>The more the merrier!</p>



<a name="213087552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213087552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213087552">(Oct 12 2020 at 21:19)</a>:</h4>
<p>Alternatively, you could do <code>A-queries</code>, but <code>A-query-system</code> is probably clearer</p>



<a name="213087826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Make%20rustc_query_system%20dyn/near/213087826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Make.20rustc_query_system.20dyn.html#213087826">(Oct 12 2020 at 21:22)</a>:</h4>
<p>added A-query-system</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>